const path = require('path');

// 引入规则中间件
const rule = require('./rule');
module.exports = app => {
  rule({
    app,
    rules: [
      {
        folder: path.join(__dirname, '../controllers'),
        name: 'controllers'
      },
      {
        folder: path.join(__dirname, '../services'),
        name: 'services'
      },
      {
        folder: path.join(__dirname, '../models'),
        name: 'models'
      }
    ]
  });
};
